import java.util.Arrays;
import java.util.Comparator;
public class Main {
    public static void main(String[] args) {
//        int[] numbers = {1, 2, 3, 4, 5};
//        int loc= Arrays.binarySearch(numbers, 3);
//        System.out.println(loc);
        Integer[] numbers = {10,3,5,7,9,2,1,4,8,6};
        System.out.println(Arrays.toString(numbers));
        Arrays.sort(numbers);
        System.out.println(Arrays.toString(numbers));
        Arrays.sort(numbers, new Comparator<Integer>() {
            public int compare(Integer o1, Integer o2) {
                return o2 - o1;
            }
        });

    }
}